{% extends "base.html" %}
{% block title %}管理员控制台 - Root{% endblock %}

{% block content %}
<div class="max-w-4xl mx-auto py-8 px-4">
    <!-- 管理员标题 -->
    <div class="text-center mb-10">
        <h1 class="text-3xl font-bold text-gray-800">管理员控制台</h1>
        <p class="text-gray-500 mt-2">欢迎回来，{{ user.username }}（超级管理员）</p>
    </div>

    <!-- 管理功能按钮区 -->
    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
        <!-- 1. 题库管理按钮 -->
        <a href="{{ url_for('admin_manage_problems') }}" class="block">
            <div class="bg-gradient-to-br from-blue-500 to-indigo-600 rounded-xl shadow-lg p-6 h-full transform hover:scale-105 transition-transform">
                <div class="text-white text-4xl mb-4">
                    <i class="fa fa-book"></i>
                </div>
                <h2 class="text-xl font-bold text-white mb-2">题库管理</h2>
                <p class="text-blue-100">添加、编辑或删除题目，管理测试用例</p>
            </div>
        </a>

        <!-- 2. 用户管理按钮 -->
        <a href="{{ url_for('admin_manage_users') }}" class="block">
            <div class="bg-gradient-to-br from-green-500 to-teal-600 rounded-xl shadow-lg p-6 h-full transform hover:scale-105 transition-transform">
                <div class="text-white text-4xl mb-4">
                    <i class="fa fa-users"></i>
                </div>
                <h2 class="text-xl font-bold text-white mb-2">用户管理</h2>
                <p class="text-green-100">查看用户列表，修改权限或禁用账号</p>
            </div>
        </a>

        <!-- 3. 论坛管理按钮 -->
        <a href="{{ url_for('forum_index') }}" class="block">
            <div class="bg-gradient-to-br from-orange-500 to-red-500 rounded-xl shadow-lg p-6 h-full transform hover:scale-105 transition-transform">
                <div class="text-white text-4xl mb-4">
                    <i class="fa fa-comments"></i>
                </div>
                <h2 class="text-xl font-bold text-white mb-2">集市管理</h2>
                <p class="text-orange-100">维护集市秩序，删除违规内容</p>
            </div>
        </a>
    </div>
</div>
{% endblock %}